import { createStore } from 'vuex';
// 创建一个新的 store 实例
// 引入数据持久化
import persistedstate from 'vuex-persistedstate'
const store = createStore({
    state() {
        return {
            userName: '',
        }
    },
    mutations: {
        //更新用户信息
        updataadminname(state, payload) {
            state.userName = payload
        },
  
    },
    plugins: [persistedstate()]

})

export default store